package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */
public class Duck extends Animal implements ISwimming,IRunning,IFly{
    public Duck(String name, int age) {
        super(name, age);
    }
    public void cry(){
        System.out.println(this.name+"正在嘎嘎叫");
    }
    @Override
    public void eat() {
        System.out.println(this.name+"正在吃鸭粮");
    }

    @Override
    public void fly() {
        System.out.println(this.name+"正在飞");
    }

    @Override
    public void running() {
        System.out.println(this.name+"正在跑");
    }

    @Override
    public void swimming() {
        System.out.println(this.name+"正在游泳");
    }
}
